#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

//链接：https://www.acwing.com/problem/content/3265/
//暴力模拟即可，毫无技巧可言
const int N = 1010;
int main(){
    int n;
    cin >> n;
    int prices[N];
    for (int i = 1; i <= n; i++){
        cin >> prices[i];
    }
    //处理输出第一个
    cout << (prices[1] + prices[2]) / 2 << " ";
    for (int i = 2; i < n; i++){
        cout << (prices[i - 1] + prices[i] + prices[i + 1]) / 3 << " ";
    }
    //处理输出最后一个
    cout << (prices[n] + prices[n - 1]) / 2;

    return 0;
}